| Visual Basic (Declaration) | |
|---|---|
Public Overloads Shared Function AutoGenerate( _ ByVal name As System.String, _ ByVal fields As System.Collections.Generic.Dictionary(Of String,Type) _ ) As SchemaBuilder | |
| C# | |
|---|---|
public static SchemaBuilder AutoGenerate( System.string name, System.Collections.Generic.Dictionary<string,Type> fields ) | |
Parameters
- name
- The name of the schema definition.
- fields
- The fields description.
Return Value
The generated instance of the SchemaBuilder for further schema modifications.| Exception | Description |
|---|---|
| System.ArgumentNullException | The name, connection or queryString is null reference (Nothing in Visual Basic). |
This method generates schema definition which based on the result of the execution of query from the queryString.
Columns of following list of types (and corresponding DB-types) will be represented as a measures: System.SByte, System.Byte, System.Int16, System.UInt16, System.Int32, System.UInt32, System.Int64, System.UInt64, System.Decimal, System.Double, System.Single.
Columns of following list of types (and corresponding DB-types) will be represented as a attributes: System.String, System.Boolean.
Columns of following list of types (and corresponding DB-types) will be represented as a hierarchies: System.DateTime.
| C# | Copy Code |
|---|---|
Dictionary<string, Type> fields = new Dictionary<string, Type>(); fields.Add("Title", typeof(string)); fields.Add("Price", typeof(decimal)); fields.Add("Order Date", typeof(DateTime)); fields.Add("Order Count", typeof(int)); SchemaBuilder sb = SchemaBuilder.AutoGenerate("Sales History", fields); | |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2